package bigoo.peer.ride;

import java.io.Serializable;
import java.util.Date;

public class Ride implements Serializable {

    private static final long serialVersionUID = 1L;
    private String rideID;
    private String peerAddress;
    private int peerPort;
    private String destination;
    private int places;
    private Date timestamp;
    private int version;
    private String peerID;

    public Ride(String destination, String rideID, String peerID, String peerAddress, int peerPort, int places, Date timestamp, int version) {
	this.destination = destination;
	this.peerID = peerID;
	this.rideID = rideID;
	this.peerAddress = peerAddress;
	this.peerPort = peerPort;
	this.places = places;
	this.timestamp = timestamp;
	this.version = version;
    }

    public String getRideID() {
	return rideID;
    }

    public String getPeerAddress() {
	return peerAddress;
    }

    public int getPeerPort() {
	return peerPort;
    }

    public String getDestination() {
	return destination;
    }

    public int getPlaces() {
	return places;
    }

    public Date getTimestamp() {
	return timestamp;
    }

    public int getVersion() {
	return this.version;
    }

    public String getPeerID() {
	return this.peerID;
    }

    @Override
    public String toString() {
	return rideID + "|" + version + "|" + destination + "|" + timestamp + "|" + places;
    }
}
